package com.dk.controller;

import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("crud")
public class CRUDController {

  @RequestMapping("insert")
    public String insert(){
        return "insert";
    }
  @RequestMapping("update")
    public String update(){
        return "update";
    }
  @RequestMapping("delete")
    public String delete(){
      //获取当前用户
     String uname = (String)SecurityUtils.getSubject().getPrincipal();
      System.out.println("登录成功,当前用户为:"+uname);
      return "delete";
    }
  @RequestMapping("select")
    public String select(){
        return "select";
    }

}
